libxl: Do not trust frontend for nic in getinfo
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 3 May 2016 15:31:07 +0000 (16:31 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:28 +0000 (15:53 +0100)
commiteaccadee0122476fda2f02137e5f26ed6a64675f
tree0e93e5a6a1013097f00796cb680cea49c6a88910
parent7e03b128e0347b83f2b81697e2ad1e17c0682727
libxl: Do not trust frontend for nic in getinfo

libxl_device_nic_getinfo needs to examine devices without trusting
frontend-controlled data.  So:

* Use /libxl to find the backend path.
* Parse the backend path to find the backend domid, rather than
  reading it from the frontend.

This is part of XSA-175.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c